﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace monitor_client
{
    public delegate void form5_m(bool b1, bool b2);
    public partial class AddRegionForm : Form
    {
        //Form6 form6;
        oblDelegat d;
        //DateTime dt1, dt2;
        
        public AddRegionForm(oblDelegat sender1)
        {
            InitializeComponent();
            d = sender1;
            string[] cb1 = new string[] { "Брестская", "Витебская", "Гомельская", "Гродненская", "Минская", "Могилевская", "Вся Беларусь" };
            comboBox1.Items.AddRange(cb1);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedItem == null)
            {
                MessageBox.Show("Выберите область", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                
                return;
            }

            d((string)comboBox1.SelectedItem);
            this.Close();
        }
    }
}
